﻿@{
    ViewBag.Title = "Courses";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Courses</h2>

<div id="bodu">
    <ol id="courses"></ol>
</div>


@section scripts
{
    <script>
        $.ajax({
            url: '/api/course/',
            success: function(courses) {
                var list = $('#courses');
                for (var i = 0; i < courses.length; i++) {
                    var course = courses[i];
                    list.append( '<li>'+course.Title+'</li>');
                }
            }
        });

    </script>

}
